Skip to content

workflows: add build-cryptography.yml for riscv64 wheels - #362

Open
threexc wants to merge 1 commit into
mainfrom
tgamblin/cryptography
Open

workflows: add build-cryptography.yml for riscv64 wheels#362
threexc wants to merge 1 commit into
mainfrom
tgamblin/cryptography

Conversation

@threexc

@threexc threexc commented Aug 25, 2026

Copy link
Copy Markdown
Collaborator

Upstream statically links a prebuilt OpenSSL that only exists for their own platforms; we link the manylinux_riscv64 image's system OpenSSL dynamically instead and let auditwheel vendor libssl/libcrypto into the wheel.

@threexc
threexc force-pushed the tgamblin/cryptography branch from ce9b32c to e99b4f0 Compare August 26, 2026 03:08
Comment thread .github/workflows/build-cryptography.yml
Comment thread .github/workflows/build-cryptography.yml Outdated
Comment thread .github/workflows/build-cryptography.yml Outdated
@threexc
threexc force-pushed the tgamblin/cryptography branch 2 times, most recently from 6d7884d to 1acb031 Compare August 26, 2026 14:46
The upstream `container:` job can't be reused as-is: their custom
ghcr.io/pyca/cryptography-manylinux2014-style images (Rust + a static
OpenSSL build preinstalled) don't exist for riscv64, and the generic
quay.io/pypa/manylinux_2_39_riscv64 image ships no Node, so a native
`container:` job can't run the checkout/artifact actions inside it.
Drive it with `podman run` instead (same pattern as build-orjson.yml),
keeping the actions on the host and running upstream's own build
commands inside - only dropping OPENSSL_STATIC/OPENSSL_DIR/
--sbom-include (no static OpenSSL or SBOM to point at; openssl-sys
finds the image's dynamic system OpenSSL via pkg-config instead) and
installing Rust/openssl-devel ourselves.

Split the real pytest suite into its own `test` job (upstream's
wheel-builder.yml only smoketests; the full suite lives in a separate
ci.yml matrix out of scope here) using cryptography_vectors straight
from public PyPI instead of building it from vectors/.

We need to allow SHA1 in the test job's OpenSSL config, otherwise the
manylinux image's system openssl.cnf rejects SHA1 signing/verification
by default, causing 11 test failures. It isn't bundled by auditwheel, so
it never reaches the shipped wheel - only this in-container test run.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
Signed-off-by: Trevor Gamblin <tgamblin@baylibre.com>
@threexc
threexc force-pushed the tgamblin/cryptography branch from 1acb031 to 9f88e1b Compare August 26, 2026 15:59
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants